#include <iostream>
#include <string>
#include <sstream>

unsigned long f(unsigned long a)
{
	if(a<=1)
		return 1;
	else
		return a * f(a-1);
}

int main()
{
	std::cout << "nermuceq tiv(0-ic minjev 33): ";
	unsigned long a = 0;
	std::cin >> a;
	unsigned long b = f(a);
	std::cout << a << "! = " << b << "\n";
	std::stringstream aaa;
	aaa << b;
	std::string s = aaa.str();
	int k = 0;
	for(int i =s.length()-1;s[i]=='0';--i)
	{
		if(s[i]=='0')
		{
			++k;
		}
	}
	std::cout << "verjic 0-neri qanak@: " << k << "\n";
	return 0;
}